<?php

namespace app\http\middleware;

class Apilogin
{
    public function handle($request, \Closure $next)
    {
    	if (!cookie('user_id')) {
            return json(['code'=>0,'msg'=>'请先登录','data'=>'']);
        }

        return $next($request);
    }
}